//
//  DHFashionWear_LargeRectangleCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/1/8.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "DHFashionWear_LargeRectangleCell.h"
#import "FashionArticle.h"

@interface DHFashionWear_LargeRectangleCell()

@property (weak, nonatomic) IBOutlet UIImageView *bgImgView;
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *authorHeadImgView;
@property (weak, nonatomic) IBOutlet UILabel *authorNameLabel;

@end

@implementation DHFashionWear_LargeRectangleCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)updateWith:(FashionArticle *)article{
    [self.bgImgView dh_setImageURLString:article.cover];
    self.numberLabel.text = [NSString stringWithFormat:@"%@个赞 | %@评论", article.nice_count, article.comment_count];
    self.titleLabel.text = article.title;
    self.authorNameLabel.text = article.owner.nickname;
    [self.authorHeadImgView dh_setImageURLString:article.owner.photo];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
